package com.ruoyi.project.DataInfo.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.DataInfo.service.IDataInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("data_info")
public class DataInfoController extends BaseController {
    @Autowired
    IDataInfoService dataInfoService;

    @PostMapping("/exist")
    public @ResponseBody
    List<Map<String, String>> exist(Map<String,Object> map) {
        return dataInfoService.exist(map);
    }

    @PostMapping("/search")
    public @ResponseBody List<Map<String, String>> search(Map<String,Object> map) {
        return dataInfoService.search(map);
    }

    @PostMapping("/getYear")
    public @ResponseBody List<Map<String, String>> getYear(Map<String,Object> map) {
        return dataInfoService.getYear(map);
    }
    @GetMapping("/getCompany")
    public @ResponseBody List<Map<String, String>> getCompany(Map<String,Object> map) {
        return dataInfoService.getCompany(map);
    }

    @PostMapping("/getMonth")
    public @ResponseBody List<Map<String, String>> getMonth(Map<String,Object> map) {
        return dataInfoService.getMonth(map);
    }

    @PostMapping("/getMaxYM")
    public @ResponseBody List<Map<String, String>> getMaxYM(Map<String,Object> map) {
        return dataInfoService.getMaxYM(map);
    }


}
